﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Mediator.Framework.Runtime.QueryProcessing;

namespace TestApp
{
    class Program
    {
        public class DataItem
        {
            public int ID
            { 
                get;
                set;
            }
            public int NextID
            {
                get; 
                set;
            }
            public String Value
            {
                get; 
                set;
            }
        }
        static void Main(string[] args)
        {
            var collection = new[] {new DataItem() {ID = 1,NextID = 2,Value = "sdaas"},new DataItem(){ID = 2,NextID = 1,Value = "sdkskd"}}.AsQueryable();
            var query = from i1 in collection
                        join i2 in collection on i1.NextID equals i2.ID
                        group i1 by collection.Count();
            query.WrapQueryable();
        }
    }
}
